//
//  InputTempletFourTableViewCell.m
//  CedarFinancePH
//
//  Created by menchao on 2018/4/3.
//  Copyright © 2018年 cedarhd. All rights reserved.
//

#import "InputTempletFourTableViewCell.h"

@interface InputTempletFourTableViewCell ()

@property (nonatomic,strong) UIImageView *titleImageView;
@property (nonatomic,strong) UILabel *titleLbl;

@end


@implementation InputTempletFourTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self!=nil){
      //  self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self.contentView addSubview:self.titleImageView];
        [self.contentView addSubview:self.titleLbl];
        [self.titleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.contentView).mas_offset(kMarginOffsetX);
            make.centerY.mas_equalTo(self.contentView);
            make.size.mas_offset(CGSizeMake(16, 16));
        }];
        [self.titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.titleImageView.mas_right).mas_offset(20);
            make.centerY.mas_equalTo(self.contentView);
        }];
        self.titleImageView.contentMode =  UIViewContentModeScaleAspectFit;
    }
    return self;
}

- (void)updateCellWithImage:(NSString *)imageName title:(NSString *)title{
    self.titleImageView.image = [UIImage imageNamed:imageName];
    self.titleLbl.text = title;
}

MACRO_UIImageView(titleImageView,@"")
MACRO_UILabelWithPFCGFont(titleLbl,nil,kBlackColor, 15)

+ (CGFloat)heightForCell{
    return 55;
}


@end
